import request from '@/utils/request'

// 查询群信息列表
export function listGroups(query) {
  return request({
    url: '/model/groups/list',
    method: 'get',
    params: query
  })
}

// 查询群信息详细
export function getGroups(id) {
  return request({
    url: '/model/groups/' + id,
    method: 'get'
  })
}
// 查询群成员
export function members(id,query) {
  return request({
    url: '/model/groups/members/' + id,
    method: 'get',
    params: query
  })
}

// 新增群信息
export function addGroups(data) {
  return request({
    url: '/model/groups',
    method: 'post',
    data: data
  })
}

// 修改群信息
export function updateGroups(data) {
  return request({
    url: '/model/groups',
    method: 'put',
    data: data
  })
}

// 删除群信息
export function delGroups(id) {
  return request({
    url: '/model/groups/' + id,
    method: 'delete'
  })
}

// 导出群信息
export function exportGroups(query) {
  return request({
    url: '/model/groups/export',
    method: 'get',
    params: query
  })
}
